package com.l024.android_ljl.view.main.fragment;

import android.os.Bundle;
import android.view.View;

import com.l024.android_ljl.R;
import com.l024.android_ljl.databinding.FragmentHomeBinding;
import com.l024.android_ljl.view.main.activity.SearchActivity;
import com.l024.android_ljl.view.main.activity.SubjectActivity;
import com.l024.android_ljl.view.main.activity.SubjectTypeActivity;
import com.l024.android_ljl.viewmodel.main.MainViewModel;
import com.quantstack.llcommonlibrary.base.BaseNullFragment;
import com.quantstack.llcommonlibrary.event.OnClickEvent;

/**
 * @author wu_ming_zhi_bei
 * @date 2021/5/7 12:35
 * @Notes 管理页面
 */
public class HomeFragment extends BaseNullFragment<MainViewModel, FragmentHomeBinding> {

    @Override
    public int getLayoutId() {
        return R.layout.fragment_home;
    }

    @Override
    public void afterCreate() {
        mViewDataBind.ll1.setOnClickListener(new OnClickEvent() {
            @Override
            public void singleClick(View v) {
                Bundle bundle = new Bundle();
                bundle.putLong("typeId",0);
                go(SubjectActivity.class,bundle);
            }
        });
        mViewDataBind.ll2.setOnClickListener(new OnClickEvent() {
            @Override
            public void singleClick(View v) {
                go(SubjectTypeActivity.class);
            }
        });
        mViewDataBind.ll3.setOnClickListener(new OnClickEvent() {
            @Override
            public void singleClick(View v) {
                go(SearchActivity.class);
            }
        });
    }
}